package com.brainhealth.customer.service;

import com.brainhealth.customer.domain.ScoreConsumeRecord;
import com.brainhealth.customer.domain.ScoreMallOrder;
import com.brainhealth.customer.domain.ScoreRecord;
import com.brainhealth.customer.domain.params.ScoreRechargeParam;
import com.brainhealth.customer.domain.vo.ScoreBase;
import com.brainhealth.customer.domain.vo.ScoreRechargeOrderVO;
import com.brainhealth.customer.domain.vo.ScoreRecordVO;
import com.brainhealth.customer.domain.vo.ScoreVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;

/**
 * 积分服务
 * @author wll
 */
public interface IScoreService {

    /**
     * 创建积分充值订单
     *
     * @return
     */
    ScoreMallOrder createScoreRechargeOrder(HttpServletRequest request, ScoreRechargeParam scoreRechargeParam);

    /**
     * 积分充值
     * @param request
     * @param scoreRechargeParam
     * @return
     */
    ScoreMallOrder scoreRechargeOrderPay(HttpServletRequest request, ScoreRechargeParam scoreRechargeParam);

    /**
     * 获取积分充值订单支付剩余时间
     * @return
     */
    Date getScoreRechargeOrderRemainTime(HttpServletRequest request);

    /**
     * 支付回调
     * @param
     * @return
     */
    void scoreRechargeOrderCallback(HttpServletRequest request, HttpServletResponse response);

    /**
     * 查询积分充值订单
     * @param orderId
     * @return
     */
    ScoreMallOrder getScoreMallOrder(String orderId);

    /**
     * 获取用户积分充值订单列表
     * @param request
     * @return
     */
    List<ScoreMallOrder> getSoreOrderList(HttpServletRequest request);

    /**
     * 获取用户积分充值订单列表
     * @param scoreMallOrderList
     * @return
     */
    List<ScoreRechargeOrderVO> getScoreRechargeOrderVOList(List<ScoreMallOrder> scoreMallOrderList);

    /**
     * 查询积分基础信息
     * @param request
     * @return
     */
    ScoreBase getScoreBase(HttpServletRequest request);

    /**
     * 查询我的积分
     * @param request
     * @return
     */
    ScoreVO getScore(HttpServletRequest request);

    /**
     * 查询积分获取记录
     * @param request
     * @return
     */
    List<ScoreRecord> getScoreRecordList(HttpServletRequest request);

    /**
     * 查询积分获取记录
     * @param scoreRecordList
     * @return
     */
    List<ScoreRecordVO> getScoreRecordVOList(List<ScoreRecord> scoreRecordList);

    /**
     * 查询积分获取记录
     * @param request
     * @return
     */
    List<ScoreRecordVO> getScoreRecord(HttpServletRequest request);

    /**
     * 查询积分消耗记录
     * @param request
     * @return
     */
    List<ScoreConsumeRecord> getScoreConsumeRecordList(HttpServletRequest request);

    /**
     * 获取积分消耗记录
     * @param scoreConsumeRecordList
     * @return
     */
    List<ScoreRecordVO> getScoreConsumeRecord(List<ScoreConsumeRecord> scoreConsumeRecordList);

    /**
     * 查询积分消耗记录
     * @param request
     * @return
     */
    List<ScoreRecordVO> getScoreConsumeRecord(HttpServletRequest request);

    /**
     * 是否领取新用户见面礼
     * @param request
     * @return
     */
    Integer isGetNewUserGift(HttpServletRequest request);

    /**
     * 领取新用户见面礼
     * @param request
     * @return
     */
    Integer addNewUserGift(HttpServletRequest request);
}
